<template>
  <el-header>
    <div class="title">
      {{title}}
    </div>
    <div class='shop'>
      <div class="shop-name">
        {{shop.name}}
      </div>
      <div class="shop-avatar">
        <img :src="shop.avatar" alt="">
      </div>
    </div>
  </el-header>
</template>
<script>
export default {
  name: 'VHeader',
  props: {
    title: {
      type: String
    }
  },
  data() {
    return {}
  },
  computed: {
    shop() {
      return this.$store.state.shop
    }
  },
  methods: {},
  created() {}
}
</script>

<style lang="less" scoped>
@import './header.less';
.el-header {
  background-color: #20a0ff;
  width: 100%;
  display: flex;
  justify-content: space-between;
  color: #fff;
  .title {
    display: flex;
    align-items: center;
    font-size: 22px;
    height: 60px;
    width: 230px;
    padding: 0 20px;
  }
  .shop {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    &-name {
      font-size: 16px;
    }
    &-avatar {
      margin-left: 10px;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      overflow: hidden;
      img {
        width: 100%;
        height: 100%;
      }
    }
  }
}
</style>
